package com.service.imple.home;

import com.dao.UserCartLogMapper;
import com.entity.UserCartLog;
import com.github.pagehelper.PageInfo;
import com.service.home.CartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CartImple implements CartService {

    @Autowired
    private UserCartLogMapper userCartLogMapper;

    @Override
    public PageInfo<UserCartLog> selectByPage(Map<String, Object> map) {
        return null;
    }

    @Override
    public List<UserCartLog> select(Map map) {
        return userCartLogMapper.selectAll(map);
    }

    @Override
    public int insert(UserCartLog userCartLog) {
        return userCartLogMapper.insert(userCartLog);
    }

    @Override
    public int update(UserCartLog userCartLog) {
        return userCartLogMapper.updateByPrimaryKey(userCartLog);
    }

    @Override
    public int delete(int id) {
        return userCartLogMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int delete(UserCartLog userCartLog) {
        return userCartLogMapper.delete(userCartLog);
    }

    @Override
    public List<UserCartLog> SelectAll(Map map) {
        return userCartLogMapper.select(map);
    }

    @Override
    public List<UserCartLog> selectId(Map map) {
        return userCartLogMapper.selectId(map);
    }


}
